import loguru
import sys
import argparse

from pentestgpt.utils.pentest_gpt import pentestGPT


def main():
    """main function"""
    parser = argparse.ArgumentParser(description="PentestGPT")

    # parser arguments
    # 0. log directory
    parser.add_argument("--log_dir", type=str, default="logs")
    # 1. Reasoning Model
    parser.add_argument("--reasoning_model", type=str, default="gpt-4")
    # 2. Parsing Model
    parser.add_argument("--parsing_model", type=str, default="gpt-3.5-turbo-16k")

    # Depracted: set to False only for testing if using cookie
    parser.add_argument("--useAPI", action="store_true", default=True)

    args = parser.parse_args()

    pentestGPTHandler = pentestGPT(
        reasoning_model=args.reasoning_model,
        parsing_model=args.parsing_model,
        useAPI=args.useAPI,
        log_dir=args.log_dir,
    )

    pentestGPTHandler.main()


if __name__ == "__main__":
    main()
